In the case of a proximity sensor that detects the radiation that is emitted by a radiation source and reflected at a target object, stray radiation, for example, at a radiation window behind which the proximity sensor is arranged in an apparatus, can lead to the corruption of the measurement result.